<!DOCTYPE html>
<html><head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 
 <meta name="ROBOTS" content="NOARCHIVE">
 
 <link rel="icon" type="image/vnd.microsoft.icon" href="https://ssl.gstatic.com/codesite/ph/images/phosting.ico">
 
 
 <link rel="canonical" href="https://code.google.com/p/beautyeye/wiki/Introduction">
 
 <script src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/plusone.js" async="" type="text/javascript"></script><script type="text/javascript">
 
 
 
 
 var codesite_token = null;
 
 
 var CS_env = {"token": null, "projectName": "beautyeye", "domainName": null, "assetHostPath": "https://ssl.gstatic.com/codesite/ph", "loggedInUserEmail": null, "profileUrl": null, "assetVersionPath": "https://ssl.gstatic.com/codesite/ph/10868592318973270098", "projectHomeUrl": "/p/beautyeye", "relativeBaseUrl": ""};
 var _gaq = _gaq || [];
 _gaq.push(
 ['siteTracker._setAccount', 'UA-18071-1'],
 ['siteTracker._trackPageview']);
 
 _gaq.push(
 ['projectTracker._setAccount', 'UA-34733790-1'],
 ['projectTracker._trackPageview']);
 
 (function() {
 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
 })();
 
 </script><script src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/ga.js" async="" type="text/javascript"></script>
 
 
 <title>Introduction - 
 beautyeye -
 
 BeautyEye L&amp;F简明开发者指南. - 
 BeautyEye is a Java Swing cross-platform look and feel. - Google Project Hosting
 </title>
 <link type="text/css" rel="stylesheet" href="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/core.css">
 
 <link type="text/css" rel="stylesheet" href="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/ph_detail.css">
 
 
 
 <link type="application/atom+xml" rel="alternate" href="https://code.google.com/feeds/p/beautyeye/svnchanges/basic?path=/wiki/Introduction.wiki">
 
 
<!--[if IE]>
 <link type="text/css" rel="stylesheet" href="https://ssl.gstatic.com/codesite/ph/10868592318973270098/css/d_ie.css" >
<![endif]-->
 <style type="text/css">
 .menuIcon.off { background: no-repeat url(https://ssl.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 -42px }
 .menuIcon.on { background: no-repeat url(https://ssl.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 -28px }
 .menuIcon.down { background: no-repeat url(https://ssl.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 0; }
 
 
 #maincol {
 padding-top: 0;
 padding-bottom: 0;
 }

 
 </style>
</head>
<body class="t6">
<script type="text/javascript">
 window.___gcfg = {lang: 'en'};
 (function() 
 {var po = document.createElement("script");
 po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
 var s = document.getElementsByTagName("script")[0];
 s.parentNode.insertBefore(po, s);
 })();
</script>
<div class="headbg">

 <div id="gaia">
 

 <span>
 
 
 <a href="#" id="projects-dropdown" onclick="return false;"><u>My favorites</u> <small>▼</small></a>
 | <a href="https://www.google.com/accounts/ServiceLogin?service=code&amp;ltmpl=phosting&amp;continue=https%3A%2F%2Fcode.google.com%2Fp%2Fbeautyeye%2Fwiki%2FIntroduction&amp;followup=https%3A%2F%2Fcode.google.com%2Fp%2Fbeautyeye%2Fwiki%2FIntroduction" onclick="_CS_click('/gb/ph/signin');"><u>Sign in</u></a>
 
 </span>

 </div>

 <div class="gbh" style="left: 0pt;"></div>
 <div class="gbh" style="right: 0pt;"></div>
 
 
 <div style="height: 1px"></div>
<!--[if lte IE 7]>
<div style="text-align:center;">
Your version of Internet Explorer is not supported. Try a browser that
contributes to open source, such as <a href="http://www.firefox.com">Firefox</a>,
<a href="http://www.google.com/chrome">Google Chrome</a>, or
<a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a>.
</div>
<![endif]-->



 <table style="padding:0px; margin: 0px 0px 10px 0px; width:100%" itemscope="" itemtype="http://schema.org/CreativeWork" cellpadding="0" cellspacing="0">
 <tbody><tr style="height: 58px;">
 
 
 
 <td id="plogo">
 <link itemprop="url" href="https://code.google.com/p/beautyeye">
 <a href="https://code.google.com/p/beautyeye/">
 
 
 <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/logo.png" alt="Logo" itemprop="image">
 
 </a>
 </td>
 
 <td style="padding-left: 0.5em">
 
 <div id="pname">
 <a href="https://code.google.com/p/beautyeye/"><span itemprop="name">beautyeye</span></a>
 </div>
 
 <div id="psum">
 <a id="project_summary_link" href="https://code.google.com/p/beautyeye/"><span itemprop="description">BeautyEye is a Java Swing cross-platform look and feel.</span></a>
 
 </div>
 
 
 </td>
 <td style="white-space:nowrap;text-align:right; vertical-align:bottom;">
 
 <form action="/hosting/search">
 <input size="30" name="q" type="text">
 
 <input name="projectsearch" value="Search projects" type="submit">
 </form>
 
 </td></tr>
 </tbody></table>

</div>

 
<div id="mt" class="gtb"> 
 <a href="https://code.google.com/p/beautyeye/" class="tab ">Project&nbsp;Home</a>
 
 
 
 
 <a href="https://code.google.com/p/beautyeye/downloads/list" class="tab ">Downloads</a>
 
 
 
 
 
 <a href="https://code.google.com/p/beautyeye/w/list" class="tab active">Wiki</a>
 
 
 
 
 
 <a href="https://code.google.com/p/beautyeye/issues/list" class="tab ">Issues</a>
 
 
 
 
 
 <a href="https://code.google.com/p/beautyeye/source/checkout" class="tab ">Source</a>
 
 
 
 
 
 
 
 
 <div class="gtbc"></div>
</div>
<table class="st" align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
 <tbody><tr>
 
 
 
 <td class="subt">
 <div class="issueDetail">
<div class="isf">
 
 <span class="inIssueList"> 
 <span>Search</span>
 <form action="/p/beautyeye/w/list" method="GET" style="display:inline">
 <select id="can" name="can">
 <option disabled="disabled">Search within:</option>
 
 <option value="1">&nbsp;All wiki pages</option>
 <option value="3">&nbsp;Featured pages</option>
 <option value="2" selected="selected">&nbsp;Current pages</option>
 
 
 <option value="4">&nbsp;Deprecated pages</option>
 
 </select>
 <span>for</span>
 <span id="qq"><input size="38" id="searchq" name="q" autocomplete="off" type="text"></span>
 
 
 
 <input value="Search" type="submit">
 </form>
 </span>

 
 
 
 
 
 
 

</div>
</div>

 </td>
 
 
 
 
 
 
 <td class="bevel-right" align="right" valign="top"></td>
 </tr>
</tbody></table>


<script type="text/javascript">
 var cancelBubble = false;
 function _go(url) { document.location = url; }
</script>
<div id="maincol">

 







 <style type="text/css">
 .delcom { background: #e8e8e8 }
 .commentcontent {
 margin: 2em;
 padding: 0px 10px;
 width: 66em;
 }
 .artifactcomment {
 border-top: 3px solid #c3d9ff;
 }
 #commentform {
 border-top: 3px solid #c3d9ff;
 }
 </style>

<div id="wikipage">
<table>
 <tbody><tr>
 
 
 <td style="vertical-align:top; padding-left:5px">
 
 <div id="wikiheader">
 
 <span style="font-size:120%;font-weight:bold">Introduction</span>
 &nbsp;
 <div> 
 
 <i>BeautyEye L&amp;F简明开发者指南.</i>
 
 
 <br>
 
 <a class="label" style="padding-top: 2px" href="https://code.google.com/p/beautyeye/w/list?q=label:Featured" title="Listed on project home page">Featured</a>
 
 
 
 <div id="wikiauthor" style="float:right">
 Updated <span title="Mon Dec 30 17:05:02 2013">
 Dec 30, 2013</span>
 
 by 

 <a class="userlink" href="https://code.google.com/u/112412584823579635900/">jb2011...@gmail.com</a>
 
 </div>
 </div>
 </div>
 
 <div id="wikicontent">
 <div class="vt" id="wikimaincol">
 <h3><a name="第一步：如何开始？"></a>第一步：如何开始？<a href="#%E7%AC%AC%E4%B8%80%E6%AD%A5%EF%BC%9A%E5%A6%82%E4%BD%95%E5%BC%80%E5%A7%8B%EF%BC%9F" class="section_anchor"></a></h3><p>首先把 <strong><tt>beautyeye_lnf.jar</tt></strong> 文件作为lib放入你的项目并引用之.<br> 目前，<strong><tt>beautyeye_lnf.jar</tt></strong> 文件位于all_in_one.zip包中的位置是：<tt>all_in_one/dist/</tt> </p><h3><a name="第二步：如何使用_L&amp;F？"></a>第二步：如何使用<a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a> L&amp;F？<a href="#%E7%AC%AC%E4%BA%8C%E6%AD%A5%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_L&amp;F%EF%BC%9F" class="section_anchor"></a></h3><p><font color="#2A779D">加入以下代码，即可将你的Java程序界面更换成Beauty Eye的外观：</font> </p><pre class="prettyprint"><span class="kwd">public</span><span class="pln"> </span><span class="kwd">static</span><span class="pln"> </span><span class="kwd">void</span><span class="pln"> main</span><span class="pun">(</span><span class="typ">String</span><span class="pun">[]</span><span class="pln"> args</span><span class="pun">)</span><span class="pln"><br></span><span class="pun">{</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="kwd">try</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">{</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; org</span><span class="pun">.</span><span class="pln">jb2011</span><span class="pun">.</span><span class="pln">lnf</span><span class="pun">.</span><span class="pln">beautyeye</span><span class="pun">.</span><span class="typ">BeautyEyeLNFHelper</span><span class="pun">.</span><span class="pln">launchBeautyEyeLNF</span><span class="pun">();</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">}</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="kwd">catch</span><span class="pun">(</span><span class="typ">Exception</span><span class="pln"> e</span><span class="pun">)</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">{</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">//TODO exception</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">}</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">.....................</span><span class="pln"> </span><span class="pun">你的程序代码</span><span class="pln"> </span><span class="pun">.........................</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">.....................</span><span class="pln"> </span><span class="pun">你的程序代码</span><span class="pln"> </span><span class="pun">.........................</span><span class="pln"><br></span><span class="pun">}</span></pre><p><br> </p><hr><p></p><h3><a name="[附录1]：如何定义窗口边框类型？"></a>[附录1]：如何定义窗口边框类型？<a href="#[%E9%99%84%E5%BD%951]%EF%BC%9A%E5%A6%82%E4%BD%95%E5%AE%9A%E4%B9%89%E7%AA%97%E5%8F%A3%E8%BE%B9%E6%A1%86%E7%B1%BB%E5%9E%8B%EF%BC%9F" class="section_anchor"></a></h3><pre class="prettyprint"><span class="kwd">public</span><span class="pln"> </span><span class="kwd">static</span><span class="pln"> </span><span class="kwd">void</span><span class="pln"> main</span><span class="pun">(</span><span class="typ">String</span><span class="pun">[]</span><span class="pln"> args</span><span class="pun">)</span><span class="pln"><br></span><span class="pun">{</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="kwd">try</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">{</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">//设置本属性将改变窗口边框样式定义</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="typ">BeautyEyeLNFHelper</span><span class="pun">.</span><span class="pln">frameBorderStyle </span><span class="pun">=</span><span class="pln"> </span><span class="typ">BeautyEyeLNFHelper</span><span class="pun">.</span><span class="typ">FrameBorderStyle</span><span class="pun">.</span><span class="pln">osLookAndFeelDecorated</span><span class="pun">;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; org</span><span class="pun">.</span><span class="pln">jb2011</span><span class="pun">.</span><span class="pln">lnf</span><span class="pun">.</span><span class="pln">beautyeye</span><span class="pun">.</span><span class="typ">BeautyEyeLNFHelper</span><span class="pun">.</span><span class="pln">launchBeautyEyeLNF</span><span class="pun">();</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">}</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="kwd">catch</span><span class="pun">(</span><span class="typ">Exception</span><span class="pln"> e</span><span class="pun">)</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">{</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">//TODO exception</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">}</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">.....................</span><span class="pln"> </span><span class="pun">你的程序代码</span><span class="pln"> </span><span class="pun">.........................</span><span class="pln"><br>&nbsp; &nbsp; </span><span class="pun">.....................</span><span class="pln"> </span><span class="pun">你的程序代码</span><span class="pln"> </span><span class="pun">.........................</span><span class="pln"><br></span><span class="pun">}</span></pre><h3><a name="[附录2]：有几种窗口边框类型？"></a>[附录2]：有几种窗口边框类型？<a href="#[%E9%99%84%E5%BD%952]%EF%BC%9A%E6%9C%89%E5%87%A0%E7%A7%8D%E7%AA%97%E5%8F%A3%E8%BE%B9%E6%A1%86%E7%B1%BB%E5%9E%8B%EF%BC%9F" class="section_anchor"></a></h3><p></p><table class="wikitable"><tbody><tr><td style="border: 1px solid #ccc; padding: 5px;"> <strong>序号</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>窗口边框尖型</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>代码</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong><a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a>中默认使用</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>效果图</strong> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 1 </td><td style="border: 1px solid #ccc; padding: 5px;"> 系统默认边框 </td><td style="border: 1px solid #ccc; padding: 5px;"> <tt>FrameBorderStyle.osLookAndFeelDecorated</tt> </td><td style="border: 1px solid #ccc; padding: 5px;">  </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/x3.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 2 </td><td style="border: 1px solid #ccc; padding: 5px;"> 强立体感半透明边框 </td><td style="border: 1px solid #ccc; padding: 5px;"> <tt>FrameBorderStyle.translucencyAppleLike</tt> </td><td style="border: 1px solid #ccc; padding: 5px;"> java1.6.0_u10及更高版本时 </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/x4.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 3 </td><td style="border: 1px solid #ccc; padding: 5px;"> 弱立体感半透明边框 </td><td style="border: 1px solid #ccc; padding: 5px;"> <tt>FrameBorderStyle.translucencySmallShadow</tt> </td><td style="border: 1px solid #ccc; padding: 5px;">  </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/x1.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 4 </td><td style="border: 1px solid #ccc; padding: 5px;"> 普通不透明边框 </td><td style="border: 1px solid #ccc; padding: 5px;"> <tt>FrameBorderStyle.generalNoTranslucencyShadow</tt> </td><td style="border: 1px solid #ccc; padding: 5px;"> java1.5版本时 </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/x2.png"> </td></tr> </tbody></table><p></p><h3><a name="[附录3]：如何使用不同颜色的按钮？"></a>[附录3]：如何使用不同颜色的按钮？<a href="#[%E9%99%84%E5%BD%953]%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%E7%9A%84%E6%8C%89%E9%92%AE%EF%BC%9F" class="section_anchor"></a></h3><p></p><table class="wikitable"><tbody><tr><td style="border: 1px solid #ccc; padding: 5px;"> <strong>序号</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>代码</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong><a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a>中默认</strong> </td><td style="border: 1px solid #ccc; padding: 5px;"> <strong>效果图</strong> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 1 </td><td style="border: 1px solid #ccc; padding: 5px;">  <tt>btnInstance.setUI(new BEButtonUI().setNormalColor(BEButtonUI.NormalColor.normal));</tt> </td><td style="border: 1px solid #ccc; padding: 5px;"> YES </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/btn2.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 2 </td><td style="border: 1px solid #ccc; padding: 5px;">  <tt>btnInstance.setUI(new BEButtonUI().setNormalColor(BEButtonUI.NormalColor.green));</tt> </td><td style="border: 1px solid #ccc; padding: 5px;">  </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/btn1.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 3 </td><td style="border: 1px solid #ccc; padding: 5px;">  <tt>btnInstance.setUI(new BEButtonUI().setNormalColor(BEButtonUI.NormalColor.lightBlue));</tt> </td><td style="border: 1px solid #ccc; padding: 5px;">  </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/btn3.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 4 </td><td style="border: 1px solid #ccc; padding: 5px;">  <tt>btnInstance.setUI(new BEButtonUI().setNormalColor(BEButtonUI.NormalColor.blue));</tt> </td><td style="border: 1px solid #ccc; padding: 5px;">  </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/btn4.png"> </td></tr> <tr><td style="border: 1px solid #ccc; padding: 5px;"> 5 </td><td style="border: 1px solid #ccc; padding: 5px;">  <tt>btnInstance.setUI(new BEButtonUI().setNormalColor(BEButtonUI.NormalColor.red));</tt> </td><td style="border: 1px solid #ccc; padding: 5px;">  </td><td style="border: 1px solid #ccc; padding: 5px;"> <img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/btn5.png"> </td></tr> </tbody></table><p></p><h3><a name="[附录4]：如何隐藏“设置”按钮？"></a>[附录4]：如何隐藏“设置”按钮？<a href="#[%E9%99%84%E5%BD%954]%EF%BC%9A%E5%A6%82%E4%BD%95%E9%9A%90%E8%97%8F%E2%80%9C%E8%AE%BE%E7%BD%AE%E2%80%9D%E6%8C%89%E9%92%AE%EF%BC%9F" class="section_anchor"></a></h3><p><img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/y1.png"> </p><p><strong>说明：</strong> 该按钮目前仅作为演示窗口标题按钮的自定义能力之用，未来将开放自定义功能，目前你可选择隐藏之。 </p><pre class="prettyprint"><span class="pln">&nbsp; &nbsp; </span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">put</span><span class="pun">(</span><span class="str">"RootPane.setupButtonVisible"</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span></pre><h3><a name="[附录5]：如何开启/关闭窗口在不活动时的半透明"></a>[附录5]：如何开启/关闭窗口在不活动时的半透明效果？<a href="#[%E9%99%84%E5%BD%955]%EF%BC%9A%E5%A6%82%E4%BD%95%E5%BC%80%E5%90%AF/%E5%85%B3%E9%97%AD%E7%AA%97%E5%8F%A3%E5%9C%A8%E4%B8%8D%E6%B4%BB%E5%8A%A8%E6%97%B6%E7%9A%84%E5%8D%8A%E9%80%8F%E6%98%8E" class="section_anchor"></a></h3><p><strong><tt>@since v3.2</tt></strong> </p><pre class="prettyprint"><span class="com">//设置此开关量为false即表示关闭之，BeautyEye LNF中默认是true</span><span class="pln"><br></span><span class="typ">BeautyEyeLNFHelper</span><span class="pun">.</span><span class="pln">translucencyAtFrameInactive </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">;</span></pre><h3><a name="[附录6]：怎样让JToolBar的ui不使用渐变图片而使用"></a>[附录6]：怎样让JToolBar的ui不使用渐变图片而使用传统的纯色来填充背景？<a href="#[%E9%99%84%E5%BD%956]%EF%BC%9A%E6%80%8E%E6%A0%B7%E8%AE%A9JToolBar%E7%9A%84ui%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%B8%90%E5%8F%98%E5%9B%BE%E7%89%87%E8%80%8C%E4%BD%BF%E7%94%A8" class="section_anchor"></a></h3><p><strong><tt>@since v3.4</tt></strong> </p><p><img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/toolbar_bg_paint_contrast.png"> </p><p><strong>方法1：</strong> </p><pre class="prettyprint"><span class="com">//设置属性即可：true表示使用ToolBar.background颜色实现纯</span><span class="pln"><br></span><span class="com">//色填充背景，BeautyEye中此属性默认是false</span><span class="pln"><br></span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">put</span><span class="pun">(</span><span class="str">"ToolBar.isPaintPlainBackground"</span><span class="pun">,</span><span class="pln"> </span><span class="typ">Boolean</span><span class="pun">.</span><span class="pln">TRUE</span><span class="pun">);</span></pre><p><strong>方法2：</strong> </p><pre class="prettyprint"><span class="com">//使用ClientProperty单独设置控制每个toolbar：true表示使用ToolBar.background</span><span class="pln"><br></span><span class="com">//颜色实现纯色填充背景，BeautyEye中此属性默认是false</span><span class="pln"><br>toolbarInstance</span><span class="pun">.</span><span class="pln">putClientProperty</span><span class="pun">(</span><span class="str">"ToolBar.isPaintPlainBackground"</span><span class="pun">,</span><span class="pln"> </span><span class="typ">Boolean</span><span class="pun">.</span><span class="pln">TRUE</span><span class="pun">);</span></pre><p><strong>说明:</strong> 方法2可以单独控制每一个JToolBar组件，而方法1是全局属性，方法2的优先级高于方法1。 </p><h3><a name="[附录7]：如何自定义JToolBar_ui的border？"></a>[附录7]：如何自定义JToolBar ui的border？<a href="#[%E9%99%84%E5%BD%957]%EF%BC%9A%E5%A6%82%E4%BD%95%E8%87%AA%E5%AE%9A%E4%B9%89JToolBar_ui%E7%9A%84border%EF%BC%9F" class="section_anchor"></a></h3><p><strong><tt>@since v3.4</tt></strong> </p><p>加入以下代码，使用你自已的border： </p><pre class="prettyprint"><span class="com">//自定义JToolBar ui的border</span><span class="pln"><br></span><span class="typ">Border</span><span class="pln"> bd </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> org</span><span class="pun">.</span><span class="pln">jb2011</span><span class="pun">.</span><span class="pln">lnf</span><span class="pun">.</span><span class="pln">beautyeye</span><span class="pun">.</span><span class="pln">ch8_toolbar</span><span class="pun">.</span><span class="typ">BEToolBarUI</span><span class="pun">.</span><span class="typ">ToolBarBorder</span><span class="pun">(</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">getColor</span><span class="pun">(</span><span class="str">"ToolBar.shadow"</span><span class="pun">)</span><span class="pln"> &nbsp; &nbsp; </span><span class="com">//Floatable时触点的颜色</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="pln"> </span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">getColor</span><span class="pun">(</span><span class="str">"ToolBar.highlight"</span><span class="pun">)</span><span class="com">//Floatable时触点的阴影颜色</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Insets</span><span class="pun">(</span><span class="lit">6</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> </span><span class="lit">11</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">));</span><span class="pln"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="com">//border的默认insets</span><span class="pln"><br></span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">put</span><span class="pun">(</span><span class="str">"ToolBar.border"</span><span class="pun">,</span><span class="kwd">new</span><span class="pln"> </span><span class="typ">BorderUIResource</span><span class="pun">(</span><span class="pln">bd</span><span class="pun">));</span></pre><p><strong>说明:</strong> 以上代码必须在 “<tt>BeautyEyeLNFHelper.launchBeautyEyeLNF();</tt>” 之后执行方能起效哦。 </p><h3><a name="[附录8]：如何设置_外观下JTabbedPane的左缩进？"></a>[附录8]：如何设置BeantuEye外观下JTabbedPane的左缩进？<a href="#[%E9%99%84%E5%BD%958]%EF%BC%9A%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE_%E5%A4%96%E8%A7%82%E4%B8%8BJTabbedPane%E7%9A%84%E5%B7%A6%E7%BC%A9%E8%BF%9B%EF%BC%9F" class="section_anchor"></a></h3><p><img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/tab_indent_desc_pic.png"> </p><p>参见以下代码实现： </p><pre class="prettyprint"><span class="com">//改变InsetsUIResource参数的值即可实现</span><span class="pln"><br></span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">put</span><span class="pun">(</span><span class="str">"TabbedPane.tabAreaInsets"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> javax</span><span class="pun">.</span><span class="pln">swing</span><span class="pun">.</span><span class="pln">plaf</span><span class="pun">.</span><span class="typ">InsetsUIResource</span><span class="pun">(</span><span class="lit">3</span><span class="pun">,</span><span class="lit">20</span><span class="pun">,</span><span class="lit">2</span><span class="pun">,</span><span class="lit">20</span><span class="pun">));</span></pre><p><strong>说明:</strong> 以上代码必须在 “<tt>BeautyEyeLNFHelper.launchBeautyEyeLNF();</tt>” 之后执行方能起效哦。 </p><h3><a name="[附录9]：如何调置窗体背景全透明并完全隐藏一�"></a>[附录9]：如何调置窗体背景全透明并完全隐藏一个窗体的标题栏？<a href="#[%E9%99%84%E5%BD%959]%EF%BC%9A%E5%A6%82%E4%BD%95%E8%B0%83%E7%BD%AE%E7%AA%97%E4%BD%93%E8%83%8C%E6%99%AF%E5%85%A8%E9%80%8F%E6%98%8E%E5%B9%B6%E5%AE%8C%E5%85%A8%E9%9A%90%E8%97%8F%E4%B8%80%EF%BF%BD" class="section_anchor"></a></h3><p><img src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/help_about_trasparent.png"> </p><p>在你的窗体被setVisible(true)前调用以下代码即可： </p><pre class="prettyprint"><span class="com">// set frame full transparent</span><span class="pln"><br>frame</span><span class="pun">.</span><span class="pln">setUndecorated</span><span class="pun">(</span><span class="kwd">true</span><span class="pun">);</span><span class="pln"><br></span><span class="typ">AWTUtilities</span><span class="pun">.</span><span class="pln">setWindowOpaque</span><span class="pun">(</span><span class="pln">frame</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">false</span><span class="pun">);</span><span class="pln"><br>frame</span><span class="pun">.</span><span class="pln">getRootPane</span><span class="pun">().</span><span class="pln">setWindowDecorationStyle</span><span class="pun">(</span><span class="typ">JRootPane</span><span class="pun">.</span><span class="pln">NONE</span><span class="pun">);</span></pre><p><strong>说明:</strong> 以上代码适用于所有处于非系统窗体标题栏的情况，包括官方MetalLookAndFeel外观等。 </p><h3><a name="[附录10]：如何解决切换输入法导致白屏的问题？"></a>[附录10]：如何解决切换输入法导致白屏的问题？<a href="#[%E9%99%84%E5%BD%9510]%EF%BC%9A%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E5%88%87%E6%8D%A2%E8%BE%93%E5%85%A5%E6%B3%95%E5%AF%BC%E8%87%B4%E7%99%BD%E5%B1%8F%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%9F" class="section_anchor"></a></h3><p><strong>说明:</strong> 切换输入法导致白屏问题是由于官方的透明API的bug引起，与<a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a>本身无关。 </p><p>解决方法参见： <a href="http://hi.baidu.com/shenaodong/item/423419d57354feea55347fe5" rel="nofollow">http://hi.baidu.com/shenaodong/item/423419d57354feea55347fe5</a> 或者 <a href="http://stackoverflow.com/questions/14374111/input-method-removes-transparent-effect-from-jframe-in-swing" rel="nofollow">http://stackoverflow.com/questions/14374111/input-method-removes-transparent-effect-from-jframe-in-swing</a> </p><p><br> </p><hr><p></p><h3><a name="附录11：API文档"></a>附录11：API文档<a href="#%E9%99%84%E5%BD%9511%EF%BC%9AAPI%E6%96%87%E6%A1%A3" class="section_anchor"></a></h3><p><a href="http://beautyeye.googlecode.com/svn/trunk/beautyeye_lnf/doc/api_doc/index.html" rel="nofollow">在线阅读</a> or  <a href="http://code.google.com/p/beautyeye/downloads/list" rel="nofollow">下载all_in_one包</a> </p><h3><a name="附录12：为何java1.6.0_10或update_11版不能启用_L&amp;F"></a>附录12：为何java1.6.0_10或update 11版不能启用<a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a> L&amp;F的窗口透明？<a href="#%E9%99%84%E5%BD%9512%EF%BC%9A%E4%B8%BA%E4%BD%95java1.6.0_10%E6%88%96update_11%E7%89%88%E4%B8%8D%E8%83%BD%E5%90%AF%E7%94%A8_L&amp;F" class="section_anchor"></a></h3><p>因为该版本存在一个Bug，具体<a href="https://code.google.com/p/beautyeye/wiki/java_1_6_0_u10_BUG_6750920" rel="nofollow">请看这里</a>. </p><h3><a name="附录13：关于win7平台下某些java版本上的文本字体"></a>附录13：关于win7平台下某些java版本上的文本字体发虚的问题说明<a href="#%E9%99%84%E5%BD%9513%EF%BC%9A%E5%85%B3%E4%BA%8Ewin7%E5%B9%B3%E5%8F%B0%E4%B8%8B%E6%9F%90%E4%BA%9Bjava%E7%89%88%E6%9C%AC%E4%B8%8A%E7%9A%84%E6%96%87%E6%9C%AC%E5%AD%97%E4%BD%93" class="section_anchor"></a></h3><p>该问题具体请参见 <a title="[java官方bug导致的问题]在win7平台下的java1.6.0_33及其它版本上调用窗口透明api后窗内所有文本被强制反走样…" href="https://code.google.com/p/beautyeye/issues/detail?id=25">issue 25</a> </p><p><strong>解决方案：</strong> 把默认的字体换成win7平台下默认的微软雅黑，则字体效果会大有改善。 </p><pre class="prettyprint"><span class="com">/** UIManager中UI字体相关的key */</span><span class="pln"><br></span><span class="kwd">public</span><span class="pln"> </span><span class="kwd">static</span><span class="pln"> </span><span class="typ">String</span><span class="pun">[]</span><span class="pln"> DEFAULT_FONT &nbsp;</span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">String</span><span class="pun">[]{</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="str">"Table.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"TableHeader.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"CheckBox.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Tree.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Viewport.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ProgressBar.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"RadioButtonMenuItem.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ToolBar.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ColorChooser.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ToggleButton.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Panel.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"TextArea.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Menu.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"TableHeader.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">// ,"TextField.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"OptionPane.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"MenuBar.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Button.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Label.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"PasswordField.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ScrollPane.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"MenuItem.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ToolTip.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"List.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"EditorPane.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"Table.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"TabbedPane.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"RadioButton.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"CheckBoxMenuItem.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"TextPane.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"PopupMenu.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"TitledBorder.font"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="pun">,</span><span class="str">"ComboBox.font"</span><span class="pln"> <br></span><span class="pun">};</span></pre><pre class="prettyprint"><span class="com">// 调整默认字体</span><span class="pln"><br></span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">int</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> </span><span class="typ">SwingUtils</span><span class="pun">.</span><span class="pln">DEFAULT_FONT</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="typ">UIManager</span><span class="pun">.</span><span class="pln">put</span><span class="pun">(</span><span class="typ">SwingUtils</span><span class="pun">.</span><span class="pln">DEFAULT_FONT</span><span class="pun">[</span><span class="pln">i</span><span class="pun">],</span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Font</span><span class="pun">(</span><span class="str">"微软雅黑"</span><span class="pun">,</span><span class="pln"> </span><span class="typ">Font</span><span class="pun">.</span><span class="pln">PLAIN</span><span class="pun">,</span><span class="lit">14</span><span class="pun">));</span></pre><h3><a name="附录14：关于使用了_后窗口的contentPane变成全透�"></a>附录14：关于使用了<a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a>后窗口的contentPane变成全透明的说明<a href="#%E9%99%84%E5%BD%9514%EF%BC%9A%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8%E4%BA%86_%E5%90%8E%E7%AA%97%E5%8F%A3%E7%9A%84contentPane%E5%8F%98%E6%88%90%E5%85%A8%E9%80%8F%EF%BF%BD" class="section_anchor"></a></h3><p>首先申明这不是<a href="https://code.google.com/p/beautyeye/wiki/BeautyEye">BeautyEye</a>的
bug，这其实是官方窗口透明API的实现，JFrame（包括JDialog）的contentPane实质就是JPanel，它被认为是窗口的一部
分，官方窗口透明API在透明窗口其它部件的同时也把它透明了（我没看过源码，目前还不能确切的说），但这是合理的，因为它将能实现你还没想到的全透明场
景。 </p><p><strong>解决办法：</strong> 在contentPane上再加一层JPanel即可。 </p>
 </div>
 </div>
 </td></tr><tr>
</tr></tbody></table>
 </div>


 
 
 
 
 <br>
 <div class="artifactcomment">
 <span class="indicator">►</span> <a href="https://www.google.com/accounts/ServiceLogin?service=code&amp;ltmpl=phosting&amp;continue=https%3A%2F%2Fcode.google.com%2Fp%2Fbeautyeye%2Fwiki%2FIntroduction&amp;followup=https%3A%2F%2Fcode.google.com%2Fp%2Fbeautyeye%2Fwiki%2FIntroduction">Sign in</a> to add a comment
 </div>
 
 
 
 
 <form name="delcom" action="../w/delComment.do" method="POST">
 <input name="sequence_num" value="" type="hidden">
 <input name="create_time" value="" type="hidden">
 <input name="mode" value="" type="hidden">
 <input name="pagename" value="Introduction" type="hidden">
 <input name="token" value="" type="hidden">
 </form>


 <script src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/prettify.js"></script>
 <script type="text/javascript">
 prettyPrint();
 </script>

<script type="text/javascript" src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/dit_scripts.js"></script>



  
 
 
 <script type="text/javascript" src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/ph_core.js"></script>
 
 <script type="text/javascript" src="Introduction%20-%20beautyeye%20-%20BeautyEye%20L&amp;F%E7%AE%80%E6%98%8E%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97.%20-%20BeautyEye%20is%20a%20Java%20Swing%20cross-platform%20look%20and%20feel.%20-%20Google%20Project%20Hosting_files/ph_dwiki.js"></script>
 
 
 
 
</div> 

<div id="footer" dir="ltr">
 <div class="text">
 <a href="https://code.google.com/projecthosting/terms.html">Terms</a> -
 <a href="http://www.google.com/privacy.html">Privacy</a> -
 <a href="https://code.google.com/p/support/">Project Hosting Help</a>
 </div>
</div>
 <div class="hostedBy" style="margin-top: -20px;">
 <span style="vertical-align: top;">Powered by <a href="http://code.google.com/projecthosting/">Google Project Hosting</a></span>
 </div>

 
 


 
 



<div style="display: none;" id="menuDiv-projects-dropdown" class="menuDiv instance0"><div class="menuCategory default"></div><div class="menuCategory controls"><a href="http://www.google.com/accounts/ServiceLogin?service=code&amp;ltmpl=phosting&amp;continue=https%3A%2F%2Fcode.google.com%2Fp%2Fbeautyeye%2Fwiki%2FIntroduction&amp;amp;followup=https%3A%2F%2Fcode.google.com%2Fp%2Fbeautyeye%2Fwiki%2FIntroduction" style="display: block;" class="menuItem">Sign in to see your favorites</a><hr class="menuSeparator"><a href="https://code.google.com/hosting/" style="display: block;" class="menuItem">Find open source projects...</a><a href="https://code.google.com/hosting/createProject" style="display: block;" class="menuItem">Create a project...</a></div></div></body></html>